<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/9/3 0003
  Time: 10:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="d" uri="http://dgg.net/jsp/jstl/core" %>
<%@ taglib prefix="dgg" uri="/dgg-tags" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>证书详情</title>
    <%@ include file="../../../header.jsp" %>
    <link rel="stylesheet" href="../../../../../static/css/aptitudes.min.css">
</head>
<body>
<div class="body-main">
    <!--证书信息 start-->
    <div class="finan-panel">
        <div class="finan-tit">
            <b>证书信息</b>
        </div>
        <div class="panel-table">
            <form action="">
                <table class="layui-table table-info">
                    <tbody>
                    <tr>
                        <th>证书类型</th>
                        <td>${credential.certificateType}</td>
                        <th>证书专业</th>
                        <td>${credential.certificateSpecialtys}</td>
                        <th>证书级别</th>
                        <td>${credential.certificateLevel}</td>
                        <th>地区</th>
                        <td>${empty credential.areaProvince?'':credential.areaProvince}${empty credential.certificateArea?'':'/'}${credential.certificateArea}</td>
                    </tr>
                    <tr>
                        <th>证书编号</th>
                        <td>
                            <input type="hidden" name="certificateCode" value="${credential.certificateNo}">
                            ${credential.certificateNo}
                        </td>
                        <th>证书过期时间</th>
                        <td><fmt:formatDate value="${credential.certificateExpiryTime}" pattern="yyyy-MM-dd"/></td>
                        <th>合同签订时间</th>
                        <td><fmt:formatDate value="${credential.contractSigningTime}" pattern="yyyy-MM-dd"/></td>
                        <th>适用范围</th>
                        <td>${credential.applicationScope}</td>
                    </tr>
                    <tr>
                        <th>三类证书</th>
                        <td>${credential.certificateToThree}</td>
                        <th>三类证书到期时间</th>
                        <td><fmt:formatDate value="${credential.certificateToThreeTime}" pattern="yyyy-MM-dd"/></td>
                        <th>收证价格</th>
                        <td>${credential.receiptPrice}</td>
                        <th>证书总价(挂出价格)</th>
                        <td>${credential.certificatePrice}</td>
                    </tr>
                    <tr>
                        <th>类别</th>
                        <td>${credential.certificateCategory}</td>
                        <th>证书名称</th>
                        <td>${credential.certificateName}</td>
                        <th>是否买社保</th>
                        <td>${credential.socialSecurity == '0' ? '是' : '否'}</td>
                        <th>社保区域</th>
                        <td>${credential.socialSecurityAreaChange}</td>
                    </tr>
                    <tr>
                        <th>人才原件是否配合</th>
                        <td>${credential.isTalentOriginalCopyCoordinate == '0' ? '是' : '否'}</td>
                        <th>人才出场是否配合</th>
                        <td>${credential.isTalentAppearanceCoordinate == '0' ? '是' : '否'}</td>
                        <th>特殊备注</th>
                        <td>${credential.specialNote}</td>
                    </tr>
                    </tbody>
                </table>
            </form>
        </div>
    </div>
    <!--证书信息 end-->
    <!--收证信息 start-->
    <div class="finan-panel">
        <div class="finan-tit">
            <b>收证信息</b>
        </div>
        <div class="panel-table">
            <table class="layui-table table-info">
                <tbody>
                <tr>
                    <th>收证商务</th>
                    <td>${credential.collectorName}</td>
                    <th>合同编号</th>
                    <td>${credential.contractNo}</td>
                    <th>是否代签</th>
                    <td>${credential.isWhetherSign == 1 ? '否':'是'}</td>
                    <th>证书录入时间</th>
                    <td><fmt:formatDate value="${credential.certificateEntryTime}" pattern="yyyy-MM-dd"/></td>
                </tr>
                <tr>
                    <th>持证人姓名</th>
                    <td>${credential.personalName}</td>
                    <th>身份证号码</th>
                    <td><dgg:enIdCard code="${credential.personalIdCard}"/></td>
                    <th>联系电话</th>
                    <td>
                        <input type="hidden" id="cusPhone" value="${credential.personalPhone}"/>
                        <p id="hiddenNumber" style="display:inline-block">${credential.personalPhone}</p>

                        <d:hasUrlAuth authCode="ZZSC_ZS_SEE_PHONE">
                            <a href="javascript:void(0)" class="opt-icon look"
                               onclick="seeNumber(this,'${credential.id}')"></a>
                        </d:hasUrlAuth>
                    </td>
                    <th>微信号码</th>
                    <td>${credential.personalWeixin}</td>
                </tr>
                <tr>
                    <th>收款户名</th>
                    <td>${credential.accountName}</td>
                    <th>收款账号</th>
                    <td>${credential.accountNo}</td>
                    <th>开户行</th>
                    <td>${credential.accountBank}</td>
                    <th></th>
                    <td></td>
                </tr>
                <tr>
                    <th>人才付款方式</th>
                    <td>${credential.talentPaymentMethod == '0' ? '签付' : '使用后付款'}</td>
                    <th>收证类型</th>
                    <td>${credential.receiptType== '0' ? '渠道收证' : '人才收证'}</td>
                    <th>渠道名称</th>
                    <td>${credential.channelName}</td>
                    <th>渠道电话</th>
                    <td>${credential.channelPhone}</td>
                </tr>
                <tr>
                    <th>定金</th>
                    <td>${credential.deposit}</td>
                    <th>定金支付时间</th>
                    <td><fmt:formatDate value="${credential.depositPayTime}" pattern="yyyy-MM-dd"/></td>
                    <th>尾款</th>
                    <td>${credential.tailMoney}</td>
                    <th>尾款支付时间</th>
                    <td><fmt:formatDate value="${credential.tailMoneyPayTime}" pattern="yyyy-MM-dd"/></td>
                </tr>
                <tr>
                    <th>是否有资格证书</th>
                    <td>${credential.isQuelificationCertificate == 1?'否':'是'}</td>
                    <th>是否有毕业证书</th>
                    <td>${credential.isGraduationCertificate == 1?'否':'是'}</td>
                    <%--<th>是否有信息卡</th>--%>
                    <%--<td>${credential.isInformationCard == 1?'否':'是'}</td>--%>
                    <th>是否集团归档</th>
                    <td>${credential.isGroupFiling == 1?'否':'是'}</td>
                    <th>渠道身份证号</th>
                    <td>${credential.channelIdCard}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <!--收证信息 end-->
    <!--证书状态 start-->
    <div class="finan-panel">
        <div class="finan-tit">
            <b>证书状态</b>
        </div>
        <div class="panel-table">
            <table class="layui-table table-info">
                <tbody>
                <tr>
                    <th>在库状态</th>
                    <td>${credential.certificateStatus}</td>
                    <th>最新出库时间</th>
                    <td><fmt:formatDate value="${credential.lastOutgoingTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                    <th>最新入库时间</th>
                    <td><fmt:formatDate value="${credential.lastWarehousingTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                    <th></th>
                    <td></td>
                </tr>
                <tr>
                    <th>人才合同到期时间</th>
                    <td><fmt:formatDate value="${credential.talentContractExpireTime}" pattern="yyyy-MM-dd"/></td>
                    <th>企业合同到期时间</th>
                    <td><fmt:formatDate value="${credential.companyContractExpireTime}" pattern="yyyy-MM-dd"/></td>
                    <th>使用公司</th>
                    <td>${credential.affiliatedCompany}</td>
                    <th>使用起始时间</th>
                    <td><fmt:formatDate value="${credential.affiliatedStartTime}" pattern="yyyy-MM-dd"/></td>
                </tr>
                <tr>
                    <th>使用到期时间</th>
                    <td><fmt:formatDate value="${credential.affiliatedExpireTime}" pattern="yyyy-MM-dd"/></td>
                    <th>三类使用公司</th>
                    <td>${credential.threeAffiliatedCompany}</td>
                    <th>三类使用起始时间</th>
                    <td><fmt:formatDate value="${credential.threeAffiliatedStartTime}" pattern="yyyy-MM-dd"/></td>
                    <th>三类使用到期时间</th>
                    <td><fmt:formatDate value="${credential.threeAffiliatedExpireTime}" pattern="yyyy-MM-dd"/></td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <!--证书状态 end-->

    <!--附件信息 start-->
    <div class="finan-panel">
        <div class="finan-tit">
            <b>附件信息</b>
        </div>
        <div class="panel-main">
            <div class="panel-main">
                <%--<ul class="data-warp" id="previewImg">
                    <li>
                        &lt;%&ndash;<a href="javascript:void(0)" class="upload-button" id="upload" ></a>&ndash;%&gt;
                        <input type="hidden" id="upload">
                        <!-- is-remove 是否可以删除 0-不可以       is-down 是否可以下载 -->
                        <input type="hidden" name="file" multiple="" id="annexUpload" data-type="credential" data-fileid="${credential.id}" is-remove="0" load-file="1">
                    </li>
                </ul>--%>
                    <ul class="data-warp">
                        <li style="width: 100px;">证书附件</li>
                        <li>
                            <a href="javascript:void(0)" class="upload-button" id="upload"></a>
                            <input class="layui-upload-file" type="file" name="file" multiple="" id="annexUpload" data-type="credential" data-fileid="${credential.id}" is-remove="1" load-file="1">
                            <p>上传附件</p>
                        </li>
                    </ul>
                    <ul class="data-warp">
                        <li style="width: 100px;">证书使用附件</li>
                        <li>
                            <a href="javascript:void(0)" class="upload-button" id="upload1"></a>
                            <input class="layui-upload-file" type="file" name="file" multiple="" id="annexUpload1" data-type="attachmentForCertificate" data-fileid="${credential.id}" is-remove="1" load-file="1">
                            <p>上传附件</p>
                        </li>
                    </ul>
                    <ul class="data-warp">
                        <li style="width: 100px;">财务付款附件</li>
                        <li>
                            <a href="javascript:void(0)" class="upload-button" id="upload2"></a>
                            <input class="layui-upload-file" type="file" name="file" multiple="" id="annexUpload2" data-type="financialPaymentAttachment" data-fileid="${credential.id}" is-remove="1" load-file="1">
                            <p>上传附件</p>
                        </li>
                    </ul>
            </div>
        </div>
    </div>
    <!--附件信息 end-->
    <div class="tab-panel layui-tab">
        <ul class="tab-tit layui-tab-title">
            <li class="layui-this"><a href="javascript:void(0)">历史记录</a></li>
            <li><a href="javascript:void(0)" onclick="loadAccountsData('[name=\'accountsTable\']')">收支记录</a></li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div class="record-warp">
                    <select class="select-style" name="operateType" onchange="search('[name=\'operateTable\']','reload')">
                        <option value="">请选择</option>
                    </select>
                </div>
                <table class="cell-border crm-table" id="operateTable">

                </table>
            </div>
            <div class="layui-tab-item">
                <div class="record-warp">
                    <input type="hidden" name="id" value="${credential.id}"/>
                    <select class="select-style" onchange="loadAccountsData('[name=\'accountsTable\']')" name="accountsType">
                        <option value="1" selected>全部</option>
                        <option value="2">收入</option>
                        <option value="3">支出</option>
                    </select>
                </div>
                <ul class="business-info">
                    <li><b>支付金额合计：</b><span name="payCount">0</span></li>
                    <li><b>收款金额合计：</b><span name="receiptCount">0</span></li>
                </ul>
                <table class="cell-border crm-table dataTable no-footer" name="accountsTable">
                    <thead>
                    <tr>
                        <th>所属订单</th>
                        <th>收支类型</th>
                        <th>时间</th>
                        <th>金额（元）</th>
                        <th>备注</th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
        <d:hasUrlAuth authCode="ZZSC_PIC_SEE_DOWN">
            <input type="hidden" name="isShow" value="1">
        </d:hasUrlAuth>

    </div>
</div>
<%@ include file="../../../footer.jsp" %>
<script src="${rootUrl}/static/js/zzsc/common/files/annex.js?v=${version}" type="text/javascript" charset="utf-8"></script>
<script src="${rootUrl}/static/js/zzsc/credential/generalCertificate/certificateDetail.js?v=${version}" type="text/javascript" charset="utf-8"></script>
</body>
</html>
<script>
    var isShow = $('[name="isShow"]').val();
    if (!checkIsEmpty(isShow)) {
        $("#annexUpload").attr("is-down-load", '1');
        $("#annexUpload").attr("is-magnify", '1');
    }
    function seeNumber(obj,id) {
        $.ajax({
            url: sysInfo.basePath + "/zs/general_credential/see_number.do",
            data: {id:id},
            type: "POST",
            dataType: "json",
            success: function (result) {
                if (result.code == 0) {
                    var beforeNumber = $("#hiddenNumber").html();
                    var number = result.data;
                    $("#hiddenNumber").html(number);
                    $(obj).hide();
                    DGG.Layer.message("5秒后自动隐藏", {icon: '2'});
                    window.setTimeout(function () {
                        $("#hiddenNumber").html(beforeNumber);
                        $(obj).show();
                    }, 5000);
                    DGG.Layer.message("5秒后自动隐藏", {icon: '2'});
                } else {
                    DGG.Layer.message(result.msg, {icon: '2'});
                }
            }
        });
    }

</script>
